package com.zjitc.common;

import com.google.gson.Gson;
import com.google.gson.GsonBuilder;
import java.text.DateFormat;

/**
 * Create by IntelliJ IDEA
 *
 * @author: jsonor
 * @date-Time: 2018/3/29 13:25
 * @description:
 */
public class GsonUtils {

  public static Gson create() {
    GsonBuilder gb = new GsonBuilder();
    gb.registerTypeAdapter(java.util.Date.class, new GsonDate()).setDateFormat(DateFormat.LONG);
    gb.registerTypeAdapter(java.util.Date.class, new GsonDate()).setDateFormat(DateFormat.LONG);
    Gson gson = gb.create();
    return gson;
  }
}

